module.exports = {
  devServer: {
    port: 8080,
    proxy: {
      '/api': {
        target: 'http://localhost:8181',
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        },
        logLevel: 'debug',
        onProxyReq: function(proxyReq, req, res) {
          console.log('Proxying request:', req.path)
        },
        onProxyRes: function(proxyRes, req, res) {
          console.log('Proxy response:', proxyRes.statusCode)
        }
      }
    }
  }
}